{/* LAYOUT模板 */}
	<layout name="layout"/>
{/* LAYOUT模板 */}

{/* import Js,Css */}
	<js href="__PUBLIC__/Js/admin/listTable.js"/>
	<js href="__PUBLIC__/Js/admin/js.util.js"/>
	<css href="__PUBLIC__/Css/admin/common.css"/>
	<js href="__PUBLIC__/Js/admin/js.selectzone.js"/>
	
	<css href="__PUBLIC__/Css/jquery-ui.css" />
	<js href="__PUBLIC__/Js/core/jquery-ui.1.10.4.js" />
	<js href="__PUBLIC__/Js/core/plugins.js"/>
{/* import Js,Css */}

<!-- [position] -->
	<include file="Template:position"/>
<!-- [position] -->

<form name="theForm" method="get" action="__URL__/operate_post" onsubmit="return check()">
	<div class="list-div">
		<table>
			<tr>
				<th width="120">{:L('label_action_note')}</th>
				<td>
				<textarea name="action_note" cols="60" rows="3">{$action_note}</textarea>
				<if condition="$require_note neq '' or $require_note neq 0">
				{:L('require_field')}
				</if>		
				</td>
			</tr>
			
			<if condition="$show_cancel_note eq 1">
			<tr>
				<th>{:L('label_cancel_note')}</th>
				<td>
					<textarea name="cancel_note" cols="60" rows="3" id="cancel_note">{$cancel_note}</textarea>
					{:L('require_field')} {:L('notice_cancel_note')}
				</td>
			</tr>
			</if>
			
			
			<if condition="$show_invoice_no neq '' or $show_invoice_no neq 0">
			<tr>
				<th>{:L('label_invoice_no')}</th>
				<td><input name="invoice_no" type="text" size="30" /></td>
			</tr>
			</if>

			<if condition="$show_refund eq 1">
			<tr>
				<th>{:L('label_handle_refund')}</th>
				<td>
					<p>
						<if condition="$anonymous eq 0">
						<label>
							<input type="radio" name="refund" value="1" />{:L('return_user_money')}
						</label>
						<br>
						</if>
						<label>
							<input type="radio" name="refund" value="2" />{:L('create_user_account')}
						</label>
						<br>
						<label>
							<input name="refund" type="radio" value="3" />
							{:L('not_handle')}
						</label>
						<br>
				</p></td>
			</tr>
			<tr>
				<th>{:L('label_refund_note')}</th>
				<td><textarea name="refund_note" cols="60" rows="3" id="refund_note">{$refund_note}</textarea></td>
			</tr>
			</if>

			<tr>
				<td colspan="2">
					<div align="center">
						<input type="submit" name="submit" value="确定"  />
						<input type="button" name="back" value="返回"  onclick="history.back()" />
						<input type="hidden" name="order_id" value="{$order_id}" />
						<input type="hidden" name="operation" value="{$operation}" />
						<input type="hidden" name="act" value="<if condition="$batch eq 1">batch_operate_post<else/>operate_post</if>" />
					</div>
				</td>
			</tr>
	</table>
	</div>
</form>
<script language="JavaScript">
  var require_note = '{$require_note}';
  var show_refund  = '{$show_refund}';
  var show_cancel = '{$show_cancel_note}';
  function check()
  {
    if (require_note && document.forms['theForm'].elements['action_note'].value == '')
    {
      alert(pls_input_note);
      return false;
    }
	if (show_cancel && document.forms['theForm'].elements['cancel_note'].value == '')
	{
	  alert(pls_input_cancel);
	  return false;
	}
    if (show_refund)
    {
      var selected = false;
      for (var i = 0; i < document.forms['theForm'].elements.length; i++)
      {
        ele = document.forms['theForm'].elements[i];
        if (ele.tagName == 'INPUT' && ele.name == 'refund' && ele.checked)
        {
          selected = true;
          break;
        }
      }
      if (!selected)
      {
        alert(pls_select_refund);
        return false;
      }
    }
    return true;
  }
</script>